import request from '@/utils/request';
// 获取课程列表
export function getCourseList(data) {
  return request({
    url: '/course/list',
    method: 'post',
    data:data
  });
}
// 获取课程详情
export function getCourseDetail(courseId){
  return request({
    url: '/course/detail',
    method: 'get',
    params: {courseId}
  });
}
// 添加课程
export function addCourse(course){
    return request({
        url: "/course/add",
        method: "post",
        data: course
    })
}
// 修改课程
export function updatecourse(course){
    return request({
        url: "/course/edit",
        method: "post",
        data: course
    })
}
// 删除课程  
export function deleteCourse(courseId){
    return request({
        url: "/course/delete/"+courseId,
        method: "post",
    })
}
// 批量删除课程
export function batchDeleteCourse(courseIds){
    return request({
        url: "/course/batchDelete",
        method: "post",
        data: {courseIds}
    })
}